<script >
export default {
 methods:{
   handleSelect(){
     this.$route.fullPath.split('/')
   }
 }
}
</script>

<template>
  <el-menu :default-openeds="[]" style="min-height: 100%"
           background-color="rgb(45,68,86)"
           text-color="#FFF"
           active-text-color="#ffd04b"
           :collapse-transition="false"
            router
            @select="handleSelect"
    >

    <div style="height: 60px;line-height: 60px;text-align: center">
      <img src="../assets/logo.png" style="width: 20px;position: relative;top: 5px;margin-right: 3px" alt="">
      <b style="align-items: center;color: white;">后台管理系统</b>
    </div>

    <el-menu-item index="/index">
      <template slot="title"><i class="el-icon-house"></i>主页</template>
    </el-menu-item>
    <el-menu-item index="/echarts">
      <template slot="title"><i class="el-icon-data-analysis"></i>数据报表</template>
    </el-menu-item>
    <el-submenu index="1">
      <template slot="title"><i class="el-icon-document"></i>日志管理</template>
      <el-menu-item index="/userLog" style="margin-left: 10px">用户日志</el-menu-item>
    </el-submenu>
    <el-submenu index="2">
      <template slot="title"><i class="el-icon-document"></i>文件管理</template>
      <el-menu-item index="/file" style="margin-left: 10px">文件列表</el-menu-item>
    </el-submenu>
    <el-submenu index="3">
      <template slot="title"><i class="el-icon-user"></i>用户管理</template>
      <el-menu-item index="/user" style="margin-left: 10px">用户列表</el-menu-item>
    </el-submenu>
    <el-submenu index="4">
      <template slot="title"><i class="el-icon-s-order"></i>试题管理</template>
      <el-menu-item index="/question" style="margin-left: 10px">试题列表</el-menu-item>
    </el-submenu>
    <el-submenu index="5">
      <template slot="title"><i class="el-icon-notebook-2"></i>文章管理</template>
      <el-menu-item index="/article" style="margin-left: 10px">文章列表</el-menu-item>
    </el-submenu>
    <el-submenu index="6">
      <template slot="title"><i class="el-icon-collection-tag"></i>类型管理</template>
      <el-menu-item index="/questionType" style="margin-left: 10px">试题类型列表</el-menu-item>
      <el-menu-item index="/articleType" style="margin-left: 10px">文章类型列表</el-menu-item>
    </el-submenu>
    <el-submenu index="7">
      <template slot="title"><i class="el-icon-position"></i>标签管理</template>
      <el-menu-item index="/questionTag" style="margin-left: 10px">试题标签列表</el-menu-item>
      <el-menu-item index="/articleTag" style="margin-left: 10px">文章标签列表</el-menu-item>
    </el-submenu>
    <el-submenu index="8">
      <template slot="title"><i class="el-icon-message-solid"></i>名言管理</template>
      <el-menu-item index="/sentence" style="margin-left: 10px">名言列表</el-menu-item>
    </el-submenu>
    <el-submenu index="9">
      <template slot="title"><i class="el-icon-chat-dot-square"></i>留言管理</template>
      <el-menu-item index="/questionComment" style="margin-left: 10px">试题留言</el-menu-item>
      <el-menu-item index="/articleComment" style="margin-left: 10px">文章留言</el-menu-item>
    </el-submenu>
  </el-menu>

</template>

<style scoped>

</style>